import React, { Component } from 'react';
import Child from './List'
export default class ListItem extends Component {
    constructor(props) {
        super(props)
        this.state = {
            msg:'父类的消息',
            name:'react',
            age:18
        }
    }
    callBack = (msg,name,age)=> {
        this.setState({msg})
        this.setState({name})
        this.setState({age})
    }
    render() {
        return (
            <div>
               <p> Message {this.state.msg} </p>
               <Child callBack={this.callBack} age={this.state.age} name={this.state.name} />
            </div>
        )
    }
}